import {findNewAPI} from '@/apis/home'
import {ref} from 'vue'
import {defineStore} from 'pinia'


export const useDetail=defineStore("detail",()=>{
   
   //获取id
    const detailList= async(e)=>{
      //获取数据
   const List=ref([])
    const res = await findNewAPI()
    List.value=res.result.find((item) => e === item.id)
    return List.value
   }
   return {
    detailList

   }
   
})